package com.huazhi.wzsnw.service.impl;

import com.huazhi.wzsnw.mapper.UserRoleMapper;
import com.huazhi.wzsnw.model.UserRole;
import com.huazhi.wzsnw.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public int save(UserRole record) {
        return userRoleMapper.insertSelective(record);
    }

    @Override
    public int delete(UserRole record) {
        userRoleMapper.deleteByPrimaryKey(record.getTid());
        return 0;
    }

    @Override
    public int deletes(List<UserRole> records) {
        return 0;
    }

    @Override
    public int update(UserRole record) {
        return 0;
    }

    @Override
    public UserRole findByTid(String tid) {
        return null;
    }

    @Override
    public List<UserRole> findPagingByListTid(List<String> stringList, Integer pageIndex, Integer pageSize) {
        return null;
    }

    @Override
    public UserRole getUserRoleByUserTidAndRoleTid(String usertid, String roletid) {
        return userRoleMapper.selectUserRoleByUserTidAndRoleTid(usertid, roletid);
    }
}
